clc;%清理命令行窗口
data=readmatrix('tightlycoupled.txt');%读取excel数据，同目录下
data(1,:)=[];

ECEF=[filloutliers(data(:,2),'spline','quartiles'), ...
    filloutliers(data(:,3),'spline','quartiles'), ...
    filloutliers(data(:,4),'spline','quartiles')];
figure('Position', [400,300,900,400]);
title1=["X-axis(before algorithms)","Y-axis(before algorithms)", "Z-axis(before algorithms)"
    "X-axis(after algorithms)","Y-axis(after algorithms)", "Z-axis(after algorithms)"];
for i=1:100
    ECEF(i,:)=(0);
        ECEF2(i,:)=(0);
            ECEF3(i,:)=(0);
end
for i=1:3
    subplot(3,2,i*2-1);
    plot(data(:,1),(ECEF(:,i)-ECEF3(:,i))/20,'K',LineWidth=0.8);hold on;
    ylim([-10 10]);xlim([0 85892]);hold on;
    set(gca, 'xticklabel', 0:6:24,'xtick',0:85892/4:85892);
    legend(title1(1,i),Location='northwest',fontsize=8);
    ylabel('positioning error/m',FontSize=9);
end
xlabel('time/h',FontSize=10);
